package com.qlujavateam.service;

import com.qlujavateam.sqloperation.ToAccount;

/**
 * 和账号相关的业务逻辑处理的
 *
 * @author Administrator
 *
 */
public class AccountService {

	ToAccount adao = new ToAccount();


	public void login(String name, String pass) {
		String dbpass = adao.getPassByPhoneNo(name);
		if (dbpass == null) {// 如果用户名不存在
			throw new RuntimeException("用户名不存在");
		}

		if (!dbpass.equals(pass)) {
			throw new RuntimeException("用户名或密码错误");
		}

	}

}
